package com.sx.pipeline.app.base

import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.annotation.LayoutRes
import androidx.databinding.ViewDataBinding
import com.alibaba.android.arouter.facade.Postcard
import com.alibaba.android.arouter.facade.callback.NavCallback
import com.blankj.utilcode.util.ActivityUtils
import com.blankj.utilcode.util.SPUtils
import com.lxj.xpopup.XPopup
import com.sx.mvvmlibs.base.BaseModel
import com.sx.mvvmlibs.base.BaseViewModel
import com.sx.mvvmlibs.base.DataBindingBaseFragment
import com.sx.mvvmlibs.bus.RxBus
import com.sx.mvvmlibs.event.HttpEvent
import com.sx.mvvmlibs.utils.Logs
import com.sx.pipeline.R
import com.sx.pipeline.app.config.SPKey
import com.sx.pipeline.arouth.RouteManager
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers


/**
 * @Author: YY
 * @Date: 2022/3/19
 * @Description: 二次封装 DataBindingBaseFragment
 */
 abstract class CYDataBindingBaseFragment<V : ViewDataBinding, VM : BaseViewModel<out BaseModel>>(
    @LayoutRes private val layoutId: Int,
    varViewModelId: Int? = null,
    sharedViewModel: Boolean = false,
) : DataBindingBaseFragment<V, VM>(layoutId, varViewModelId, sharedViewModel), IStatus {
    var mPage = 1

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
    }

    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
        super.onViewCreated(view, savedInstanceState)
        // 身份类型初始化
        initIdentity(SPUtils.getInstance().getInt(SPKey.SP_IDENTITY_TYPE, 0))
    }

}